from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import (
    CategoryViewSet, TagViewSet, LinkViewSet,
    UserVisitViewSet, UserPreferenceViewSet,
    VisitStatsViewSet, FavoriteViewSet
)

router = DefaultRouter()
router.register(r'categories', CategoryViewSet)
router.register(r'tags', TagViewSet)
router.register(r'links', LinkViewSet)
router.register(r'visits', UserVisitViewSet)
router.register(r'preferences', UserPreferenceViewSet)
router.register(r'stats', VisitStatsViewSet, basename='stats')
router.register(r'favorites', FavoriteViewSet, basename='favorites')

urlpatterns = [
    path('', include(router.urls)),
]
